<?php
include_once('../include/init.php');
 global $db; 
    $username = fs_get_value("u");
    $sid = fs_get_value("sid");
    if(strlen($username) == 0){
        $error_info = "* 不能为空！";
    }
    else{
        if(strlen($username) < 4 || strlen($username) > 30){
            $error_info = "* 长度不符合要求！";
        }
        else{
            global $db;
            if($sid == ''){
                $num = $db -> row_count(TABLE_MEMBER,"passport = '".$username."'");
            }else{
                $num = $db -> row_count(TABLE_MEMBER,"passport = '".$username."' and id not in (".$sid.")");
            }
            if($num != 0){
                $error_info = "* 该账号已被使用！";
            }
            else{
                $error_info = "该账号可以使用！";
            }
        }
    }
echo $error_info;exit;
?>
